// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * EavAttributeOption generated by hbm2java
 */
@Entity
@Table(name = "eav_attribute_option", catalog = "magento")
public class EavAttributeOption implements java.io.Serializable {

	private Integer optionId;
	private EavAttribute eavAttribute;
	private short sortOrder;
	private Set eavAttributeOptionValues = new HashSet(0);

	public EavAttributeOption() {
	}

	public EavAttributeOption(EavAttribute eavAttribute, short sortOrder) {
		this.eavAttribute = eavAttribute;
		this.sortOrder = sortOrder;
	}

	public EavAttributeOption(EavAttribute eavAttribute, short sortOrder,
			Set eavAttributeOptionValues) {
		this.eavAttribute = eavAttribute;
		this.sortOrder = sortOrder;
		this.eavAttributeOptionValues = eavAttributeOptionValues;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "option_id", unique = true, nullable = false)
	public Integer getOptionId() {
		return this.optionId;
	}

	public void setOptionId(Integer optionId) {
		this.optionId = optionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attribute_id", nullable = false)
	public EavAttribute getEavAttribute() {
		return this.eavAttribute;
	}

	public void setEavAttribute(EavAttribute eavAttribute) {
		this.eavAttribute = eavAttribute;
	}

	@Column(name = "sort_order", nullable = false)
	public short getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(short sortOrder) {
		this.sortOrder = sortOrder;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "eavAttributeOption")
	public Set getEavAttributeOptionValues() {
		return this.eavAttributeOptionValues;
	}

	public void setEavAttributeOptionValues(Set eavAttributeOptionValues) {
		this.eavAttributeOptionValues = eavAttributeOptionValues;
	}

}
